package com.jasonm.rssminer.utils;

import org.apache.log4j.Logger;
import org.springframework.stereotype.Component;

import com.amazonaws.AmazonClientException;
import com.amazonaws.AmazonServiceException;
import com.amazonaws.AmazonWebServiceRequest;
import com.amazonaws.ResponseMetadata;
import com.amazonaws.auth.BasicAWSCredentials;
import com.amazonaws.services.simpleemail.AmazonSimpleEmailService;
import com.amazonaws.services.simpleemail.AmazonSimpleEmailServiceAsyncClient;
import com.amazonaws.services.simpleemail.model.DeleteVerifiedEmailAddressRequest;
import com.amazonaws.services.simpleemail.model.GetSendQuotaRequest;
import com.amazonaws.services.simpleemail.model.GetSendQuotaResult;
import com.amazonaws.services.simpleemail.model.GetSendStatisticsRequest;
import com.amazonaws.services.simpleemail.model.GetSendStatisticsResult;
import com.amazonaws.services.simpleemail.model.ListVerifiedEmailAddressesRequest;
import com.amazonaws.services.simpleemail.model.ListVerifiedEmailAddressesResult;
import com.amazonaws.services.simpleemail.model.SendEmailRequest;
import com.amazonaws.services.simpleemail.model.SendEmailResult;
import com.amazonaws.services.simpleemail.model.SendRawEmailRequest;
import com.amazonaws.services.simpleemail.model.SendRawEmailResult;
import com.amazonaws.services.simpleemail.model.VerifyEmailAddressRequest;

@Component
public class EmailResults implements AmazonSimpleEmailService {

	private final static Logger log = Logger.getLogger(EmailResults.class);

	@Override
	public void deleteVerifiedEmailAddress(
			DeleteVerifiedEmailAddressRequest arg0)
			throws AmazonServiceException, AmazonClientException {
		// TODO Auto-generated method stub
		
	}

	@Override
	public ResponseMetadata getCachedResponseMetadata(
			AmazonWebServiceRequest arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public GetSendQuotaResult getSendQuota() throws AmazonServiceException,
			AmazonClientException {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public GetSendQuotaResult getSendQuota(GetSendQuotaRequest arg0)
			throws AmazonServiceException, AmazonClientException {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public GetSendStatisticsResult getSendStatistics()
			throws AmazonServiceException, AmazonClientException {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public GetSendStatisticsResult getSendStatistics(
			GetSendStatisticsRequest arg0) throws AmazonServiceException,
			AmazonClientException {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public ListVerifiedEmailAddressesResult listVerifiedEmailAddresses()
			throws AmazonServiceException, AmazonClientException {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public ListVerifiedEmailAddressesResult listVerifiedEmailAddresses(
			ListVerifiedEmailAddressesRequest arg0)
			throws AmazonServiceException, AmazonClientException {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public SendEmailResult sendEmail(SendEmailRequest request)
			throws AmazonServiceException, AmazonClientException {
	    
		log.info("Sending E-Mail");
		
		BasicAWSCredentials cred = new BasicAWSCredentials("AKIAJXORMOZFCJ5EVURQ","28Tioe10qwHyL+7icejbE1y3bzdnsDGJCkXXRQ1e");
		
		AmazonSimpleEmailServiceAsyncClient client = new AmazonSimpleEmailServiceAsyncClient(cred);
		return client.sendEmail(request);
	}

	@Override
	public SendRawEmailResult sendRawEmail(SendRawEmailRequest arg0)
			throws AmazonServiceException, AmazonClientException {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public void setEndpoint(String arg0) throws IllegalArgumentException {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void shutdown() {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void verifyEmailAddress(VerifyEmailAddressRequest arg0)
			throws AmazonServiceException, AmazonClientException {
		// TODO Auto-generated method stub
		
	}
	
	
}
